package day04;

import java.util.Scanner;

public class HomeWorld {
    public static void main(String[] args) {
        int count=0;
        for (int years = 1900; years <2024 ; years++) {
           if (years%4==0&&years%100!=0||years%400==0){
               System.out.print(years +"  ");
               count++;
               if (count%10==0){
                   System.out.println();
               }
           }
        }







        /*
        int num=0;
        int i=1;
        while (i<=100){
           num+=i;
           i++;
        }
        System.out.println(num);*/

      /*  Scanner scan =new Sc

      anner(System.in);
        System.out.println("请输入年份");
        int year =scan.nextInt();
        System.out.println("请输入月份");
        int month =scan.nextInt();
        int days=0;
        switch (month){
            case 1:
            case 3:
            case 5:
            case 7:
            case 8:
            case 10:
            case 12:
                 days =31;
                break;
            case 4:
            case 6:
            case 9:
            case 11:
                days=30;
                break;
            case 2:
                if (year%4==0&&year%100!=0||year%400==0){
                    days=29;
                }else {
                    days=28;
                }
        }
        System.out.println(year+"年的"+month+"月份有"+days);

       */


/*
        Scanner scan =new Scanner(System.in);
        System.out.println("请输入一个整数");
        int num =scan.nextInt();
        if (num>0){
            System.out.println("+");
        }else if (num<0){
            System.out.println("-");
        }else {
            System.out.println("0");
        }

 */

     /*   for (int i = 0; i < 5; i++) {
            System.out.println("行动是成功的阶梯");
        }
        for (int i = 1; i <=9; i++) {
            System.out.println(i+"*9="+(i*9));
        }
        for (int i = 1; i <=9; i+=2) {
            System.out.println(i+"*9="+(i*9));
        }

      */


  /* Scanner scan =new Scanner(System.in);
        int num =(int)(Math.random()*1000+1);
        System.out.println("输入你要猜的数字");
        int guess= scan.nextInt();
        do {
            if (guess>num){
                System.out.println("猜大了");
            }else {
                System.out.println("猜小了");
            }
            System.out.println("重新猜");
            guess=scan.nextInt();
        }while (guess!=num);
        System.out.println("猜对了");

       */


      /*  Scanner scan =new Scanner(System.in);
        int num =(int)Math.random()*1000+1;
        System.out.println("请输入您猜的数字");
        int guess =scan.nextInt();
        while (guess!=num){
            if (guess>num){
                System.out.println("猜大了");

            }else {
                System.out.println("猜小了");
            }
            System.out.println("猜吧");
            guess= scan.nextInt();
        }
        System.out.println("猜对了");

       */


       /* Scanner scan =new Scanner(System.in);
        System.out.println("请输入您要办理的业务 1.取款 2.存款 3.退卡 4.其他");
        int guess =scan.nextInt();
        switch (guess){
            case 1:
                System.out.println("取款");
            case 2:
                System.out.println("存款");
            case 3:
                System.out.println("退卡");
            case 4:
                System.out.println("其他");
        }

        */

    }
}
